package com.gxwy.admin.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gxwy.admin.service.AdminServiceDao;

@Controller
@RequestMapping("hello")
public class ajaxController {
	@Autowired
	private  AdminServiceDao service;
  @RequestMapping(value = "ajax", method = RequestMethod.POST)
  @ResponseBody public String getUser(@RequestParam(value = "a",required = true)String a) {
   	  if(service.selectId(a)==false){
   		  return "true";}
   	  if(service.selectId(a)==true) {
          return "false";}
         return "0";
   }

}
